package reflect;

import java.util.Arrays;

/*public class ArgsDemo {
    public static void main(String[] args) {
        doSome("a","b","c");
        doSome();
        doSome("a");
    }

    public static void doSome(String... args)
    {
        System.out.println(args.length);
        System.out.println(Arrays.toString( args));
    }
}*/
public class ArgsDemo{
    public static void main(String[] args) {
        doSome(3,"a","b","c");

    }
    //变传参必须是最后一个参数
    public static void doSome(int a,String... args)
    {
        System.out.println(args.length);
        System.out.println(Arrays.toString( args));
    }
}
